﻿<?xml version="1.0" encoding="utf-8"?><Articles><Article><ArticlesID>703</ArticlesID><Title>Sử dụng HttpRequest với ASP Classic</Title><Body>&amp;lt;p&amp;gt;đoạn code sau sẽ tạo ra 1 đối tượng HttpRequest tương tự như .net&amp;lt;/p&amp;gt;
&amp;lt;pre class=&amp;quot;brush: vb;&amp;quot; title=&amp;quot;code&amp;quot;&amp;gt;
&amp;amp;lt;%@LANGUAGE=&amp;amp;quot;VBSCRIPT&amp;amp;quot; CODEPAGE=&amp;amp;quot;65001&amp;amp;quot;%&amp;amp;gt;
&amp;amp;lt;%
   If Not Request.QueryString(&amp;amp;quot;Url&amp;amp;quot;) = &amp;amp;quot;&amp;amp;quot; Then
       Session.CodePage = 65001
       Dim objXmlHttp
       Dim strHTML
       Set objXmlHttp = Server.CreateObject(&amp;amp;quot;Msxml2.ServerXMLHTTP&amp;amp;quot;)
       objXmlHttp.open &amp;amp;quot;GET&amp;amp;quot;, Request.QueryString(&amp;amp;quot;Url&amp;amp;quot;), False
       objXmlHttp.send
       strHTML = objXmlHttp.responseText
       Set objXmlHttp = Nothing
%&amp;amp;gt;
       &amp;amp;lt;base href=&amp;amp;quot;&amp;amp;lt;%=Request.QueryString(&amp;amp;quot;Url&amp;amp;quot;)%&amp;amp;gt;&amp;amp;quot; /&amp;amp;gt;
&amp;amp;lt;%= strHTML %&amp;amp;gt;
&amp;amp;lt;%
   End If
%&amp;amp;gt;
&amp;lt;/pre&amp;gt;
&amp;lt;p&amp;gt;Xem Demo &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://demo.meotom.net/vpc_asp_serverhost_do.asp?Url=http://blog.meotom.net/&amp;quot;&amp;gt;tại đ&amp;amp;acirc;y&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Nếu bạn gặp lỗi&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;Arial&amp;quot;&amp;gt;WinHttp.WinHttpRequest&amp;lt;/font&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;Arial&amp;quot;&amp;gt;error '80072efd'&amp;lt;/font&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;Arial&amp;quot;&amp;gt;A connection with the server could not be  established &amp;lt;/font&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;img width=&amp;quot;427&amp;quot; height=&amp;quot;111&amp;quot; src=&amp;quot;http://dev.meotom.net/Uploads/admin/2010/3/17/A_connection_with_the_server_could_not_be_established.gif&amp;quot; alt=&amp;quot;A connection with the server could not be established&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;xin vui l&amp;amp;ograve;ng xem &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;http://dev.meotom.net/2010/3/17/netsh-thay-doi-proxy-Windows-Server-2008-34F.htm&amp;quot;&amp;gt;tại đ&amp;amp;acirc;y&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;</Body><CommentEnabled>True</CommentEnabled><ViewCount>0</ViewCount><ReleaseDate>1/4/2010 3:14:32 AM</ReleaseDate><TotalComment>0</TotalComment><IsMedia>False</IsMedia><IsPicture>False</IsPicture><IsVote>True</IsVote><ArticlePassword /><PostVisible>0</PostVisible><ArticlePath>/2010/1/4/HttpRequest-ASP-Classic-2BF</ArticlePath><Approved>True</Approved><ImagePath /><CategoryId>36</CategoryId><ArrayCatID>36|25</ArrayCatID></Article></Articles>